home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_Tix.idb / usr / freeware / lib / tix4.1 / FileCmpt.tcl.z / FileCmpt.tcl
Encoding:
Text File  |  1999-01-26  |  886 b   |  32 lines

  1. # FileCmpt.tcl --
  2. #
  3. #    File access portibility routines.
  4. #
  5. # Copyright (c) 1996, Expert Interface Technologies
  6. #
  7. # See the file "license.terms" for information on usage and redistribution
  8. # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  9. #
  10.  
  11.  
  12. # Internal file names
  13. # (1) Idempotent: [tixFileIntName $intName] == $intName
  14. # (2) Does not contain "~", "..", "."
  15. # (3) All DOS type C:foo will be translated to absoulte path such as
  16. #     /\C:\windows\foo
  17. # (4) Does not contail trailing "/" or "\\" characters
  18. #
  19.  
  20. proc tixFileResolveName {nativeName {defParent ""}} {
  21.     if {$defParent != ""} {
  22.     return [tixNativeName [tixFileIntName $nativeName [tixFileIntName $defParent]]]
  23.     } else {
  24.         return [tixNativeName [tixFileIntName $nativeName]]
  25.     }
  26. }
  27.  
  28. proc tixNSubFolder {parent sub} {
  29.     return [tixNativeName [tixSubFolder \
  30.     [tixFileIntName $parent] [tixFileIntName $sub]]]
  31. }
  32.